﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LCA.Community.DAL.Model;

namespace LCA.Community.DAL.Test.ModelFactories
{
    public class EventsFactory
    {
        private int _count = 0;

        public EventsFactory()
        {

        }

        public Event CreateEntity(string group)
        {
            var lcaEvent = new Event(
                    group,
                    String.Format("The event {0}", _count),
                    String.Format("This is the event {0}", _count),
                    DateTime.Now.AddHours(_count),
                    String.Format("Place 1"),
                    20
                    );
            lcaEvent.RowKey = Guid.NewGuid().ToString();

            _count++;

            return lcaEvent;
        }

        public List<Event> CreateList(int count, string group)
        {
            var list = new List<Event>();

            for (int i = 0; i < count; i++)
            {
                list.Add(CreateEntity(group));
                _count++;
            }

            return list;
        }
    }
}
